package com.wuseguang.springcloud.dao.repository;

import com.wuseguang.springcloud.entity.EvaluationLabelAndScoreItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface EvaluationLabelAndScoreItemRepository extends JpaRepository<EvaluationLabelAndScoreItem,Integer> {

    @Transactional
    @Modifying
    @Query(value = "DELETE FROM `evaluation_label_and_score_item` WHERE `score_item_id` = ?1",nativeQuery = true)
    int deleteByScoreItemId(Integer id);
}
